package com.user.console;

import java.util.Arrays;
public class Main {
    public static void main(String args[]) {
        int tmp = 0;
        int[] 数组 = { 12, 3, 9, 8, 4, 3, 2 };
        for (int i = 0; i < 数组.length; i++) {
            for(int j = 0;j < 数组.length -1 - i ;j++) {
                if (数组[j] > 数组[j + 1]) {
                tmp = 数组[j];
                数组[j] = 数组[j+1];
                数组[j+1] = tmp;
            }
            }
        }
        for(int i = 0;i < 数组.length;i++) {
            System.out.println(数组[i]);
        }
    }
}